import { Transform } from 'class-transformer';
import { DeptDto } from './DeptDto';
import { PostDto } from './PostDto';
import { RoleDto } from './RoleDto';
import { Util } from 'src/common/Util';

/*
 * @Author: jingfuu@163.com
 * @Date: 2024-10-06 21:47:59
 * @LastEditTime: 2024-11-25 11:03:58
 * @Description: file content
 */
export class UserDto {
  userId: number;
  deptId: number;
  userName: string;
  nickName: string;
  userType: string;
  email: string;
  phonenumber: string;
  sex: string;
  password: string;
  avatar: string;
  status: string;
  loginIp: string;
  @Transform(({ value }) => Util.convertTimeStr(value))
  loginDate: string;
  roles: RoleDto[];
  posts: PostDto[];
  postIds: number[];
  roleIds: number[];
  permissions: string[];
  dept: DeptDto;
  createBy: string;
  @Transform(({ value }) => Util.convertTimeStr(value))
  createTime: string;
  updateBy: string;
  @Transform(({ value }) => Util.convertTimeStr(value))
  updateTime: string;
  remark: string;
}
